package com.kcyu.sfherp.mapper.ms;

import com.kcyu.sfherp.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysMapper {

    @Select("select cast(pass as varchar) from pass where name='${username}'")
    public String getUserPass(@Param("username") String username);

    @Select("select cast(pass as varchar) as pass, name from pass where name='${username}'")
    public User getUserByName(@Param("username") String username);

    @Select("select name from pass ")
    List<String> getUsers();
}
